<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- saved from url=(0053)http://pastehtml.com.nyud.net:8080/raw/bq8de0eg2.html -->
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

    <title>Helper Blogger HTML Code Encoder</title>

  </head>

  <body>

    <script type="text/javascript">

				

		var hex=new Array('0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f');

	

	

		function escapex()

		{

			var x=document.getElementById("from_text");

			

			

			var preescape="" + x.value;

			var escaped="";

			

			var i=0;

			var brEscape=document.getElementById('br').checked;

			var tagEscape=document.getElementById('tag').checked;

			var others=document.getElementById('other').checked;

			var nbsp=document.getElementById('nbsp').checked;

			for(i=0;i<preescape.length;i++)

			{

				var p=preescape.charAt(i);

				

				if(others) p=""+escapeCharx(p);

				if(tagEscape) p=""+escapeTags(p);

				if(brEscape) p=""+escapeBR(p);

				if(nbsp) p=""+escapeNBSP(p);

				

				escaped=escaped+p;

			}

			

			x=document.getElementById("to_text");

			x.value=escaped;

		}

		

		

	function escapeBR(original)

	{

  	   	var thechar=original.charCodeAt(0);

  	   

		switch(thechar) {

				case 10: return "<br/>"; break; //newline

				case '\r': break;

		}

		return original;	

	}	



	function escapeNBSP(original)

	{

  	   	var thechar=original.charCodeAt(0);

		switch(thechar) {

				case 32: return "&nbsp;"; break; //space

		}

		return original;	

	}	





	function escapeTags(original)

	{

  	   	var thechar=original.charCodeAt(0);

		switch(thechar) {

				case 60:return "&lt;"; break; //<

				case 62:return "&gt;"; break; //>

				case 34:return "&quot;"; break; //"

		}

		return original;

	

	}

		

	function escapeCharx(original)

	{

 	   	var found=true;

  	   	var thechar=original.charCodeAt(0);

		switch(thechar) {

				case 38:return "&amp;"; break; //&

				case 198:return "&AElig;"; break; //Ã†

				case 193:return "&Aacute;"; break; //Ã

				case 194:return "&Acirc;"; break; //Ã‚

				case 192:return "&Agrave;"; break; //Ã€

				case 197:return "&Aring;"; break; //Ã…

				case 195:return "&Atilde;"; break; //Ãƒ

				case 196:return "&Auml;"; break; //Ã„

				case 199:return "&Ccedil;"; break; //Ã‡

				case 208:return "&ETH;"; break; //Ã

				case 201:return "&Eacute;"; break; //Ã‰

				case 202:return "&Ecirc;"; break; //ÃŠ

				case 200:return "&Egrave;"; break; //Ãˆ

				case 203:return "&Euml;"; break; //Ã‹

				case 205:return "&Iacute;"; break; //Ã

				case 206:return "&Icirc;"; break; //ÃŽ

				case 204:return "&Igrave;"; break; //ÃŒ

				case 207:return "&Iuml;"; break; //Ã

				case 209:return "&Ntilde;"; break; //Ã‘

				case 211:return "&Oacute;"; break; //Ã“

				case 212:return "&Ocirc;"; break; //Ã”

				case 210:return "&Ograve;"; break; //Ã’

				case 216:return "&Oslash;"; break; //Ã˜

				case 213:return "&Otilde;"; break; //Ã•

				case 214:return "&Ouml;"; break; //Ã–

				case 222:return "&THORN;"; break; //Ãž

				case 218:return "&Uacute;"; break; //Ãš

				case 219:return "&Ucirc;"; break; //Ã›

				case 217:return "&Ugrave;"; break; //Ã™

				case 220:return "&Uuml;"; break; //Ãœ

				case 221:return "&Yacute;"; break; //Ã

				case 225:return "&aacute;"; break; //Ã¡

				case 226:return "&acirc;"; break; //Ã¢

				case 230:return "&aelig;"; break; //Ã¦

				case 224:return "&agrave;"; break; //Ã 

				case 229:return "&aring;"; break; //Ã¥

				case 227:return "&atilde;"; break; //Ã£

				case 228:return "&auml;"; break; //Ã¤

				case 231:return "&ccedil;"; break; //Ã§

				case 233:return "&eacute;"; break; //Ã©

				case 234:return "&ecirc;"; break; //Ãª

				case 232:return "&egrave;"; break; //Ã¨

				case 240:return "&eth;"; break; //Ã°

				case 235:return "&euml;"; break; //Ã«

				case 237:return "&iacute;"; break; //Ã­

				case 238:return "&icirc;"; break; //Ã®

				case 236:return "&igrave;"; break; //Ã¬

				case 239:return "&iuml;"; break; //Ã¯

				case 241:return "&ntilde;"; break; //Ã±

				case 243:return "&oacute;"; break; //Ã³

				case 244:return "&ocirc;"; break; //Ã´

				case 242:return "&ograve;"; break; //Ã²

				case 248:return "&oslash;"; break; //Ã¸

				case 245:return "&otilde;"; break; //Ãµ

				case 246:return "&ouml;"; break; //Ã¶

				case 223:return "&szlig;"; break; //ÃŸ

				case 254:return "&thorn;"; break; //Ã¾

				case 250:return "&uacute;"; break; //Ãº

				case 251:return "&ucirc;"; break; //Ã»

				case 249:return "&ugrave;"; break; //Ã¹

				case 252:return "&uuml;"; break; //Ã¼

				case 253:return "&yacute;"; break; //Ã½

				case 255:return "&yuml;"; break; //Ã¿

				case 162:return "&cent;"; break; //Â¢

				default:

					found=false;

					break;

			}

			if(!found)

			{

				if(thechar>127) {

					var c=thechar;

					var a4=c%16;

					c=Math.floor(c/16); 

					var a3=c%16;

					c=Math.floor(c/16);

					var a2=c%16;

					c=Math.floor(c/16);

					var a1=c%16;

				//	alert(a1);

					return "&#x"+hex[a1]+hex[a2]+hex[a3]+hex[a4]+";";		

				}

				else

				{

					return original;

				}

			}



		

	}

		

		

	</script>









<div class="content">

					

					<textarea onkeyup="escapex();" id="from_text" name="from_text" style="width:750px;height:200px;overflow:auto;border:1px solid #00acf2;"></textarea>

  					<br><input onclick="escapex();" type="checkbox" id="br">Replace newline with &lt;br/&gt;<br>

 	 				<input onclick="escapex();" type="checkbox" id="tag" checked="checked">Replace &lt; &gt; "<br>

  					<input onclick="escapex();" type="checkbox" id="nbsp">Replace space with &amp;nbsp;<br>

 	 				<input onclick="escapex();" type="checkbox" id="other" checked="checked">Escape special characters (&amp; and non latin chars)<br>

 

 					<br>

					<h2 style="margin:0px;padding:0px;">HTML Escaped result:</h2>

					<textarea id="to_text" name="to_text" style="width:750px;height:200px;overflow:auto;border:1px solid #00acf2;"></textarea></div>

  

</body></html>